﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Program
    {
        enum order
        {
            新订单,
            已发货,
            已签收,
            已评价
        }
        public enum fruit
        {
            哈密瓜 = 50,
            西瓜,
            奇异果,
            香蕉,
            苹果,
            草莓,
            葡萄
        }
        public enum zhiye
        {
            战士,
            法师,
            精灵
        }
        static void Main(string[] args) 
        {
            Program.Lianxi08(zhiye.战士);
            Program.Lianxi08(zhiye.法师);
            Program.Lianxi08(zhiye.精灵);
            Console.WriteLine("奇异果的得分是："+Lianxi07(fruit.奇异果));
            Console.WriteLine("苹果的得分是："+Lianxi07(fruit.苹果));
            order o = order.已发货;
            Console.WriteLine("订单状态是："+o);
            xusheng s1 = new xusheng("孙悟空");
            xusheng s2 = new xusheng("猪八戒");
            xusheng s3 = new xusheng("沙和尚");
            xusheng s4 = new xusheng("白龙马");
            s1.lianxi06();
            s2.lianxi06();
            s3.lianxi06();
            s4.lianxi06();
            xusheng.lianxi07();
            s1.lianxi06();
            s2.lianxi06();
            s3.lianxi06();
            s4.lianxi06();
        }
        static void Lianxi()
        { 

            int[] a = new int[6];
            for (int i = 0; i < 6; i++)
            {
                Console.WriteLine("请输入第{0}个数字：",i+1);
                a[i] = int.Parse(Console.ReadLine());
            }
            int max = 0;
            int min = 0;
            int sum = 0;
            int avg = 0;
            Lianxi01(ref max, ref min, ref avg, a);
            Console.WriteLine("最大数：" + max);
            Console.WriteLine("最小数：" + min);
            Console.WriteLine("和" + Lianxi01(ref max, ref min, ref avg, a));
            Console.WriteLine("平均数：" + avg);
            Lianxi02(out max, out min, out avg, a);
            Console.WriteLine("最大数：" + max);
            Console.WriteLine("最小数：" + min);
            Console.WriteLine("和" + Lianxi02(out max, out min, out avg, a));
            Console.WriteLine("平均数：" + avg);
        }
        static int Lianxi01(ref int max, ref int min, ref int avg, int[] a)
        {
            int sum = 0;
            for (int i = 0; i < a.Length; i++)
            {
                sum = sum + a[i];
            }
            Array.Sort(a);
            max = a[4];
            min = a[0];
            avg = sum / 5;
            return sum;
        }
        static int Lianxi02(out int max, out int min, out int avg, int[] a)
        {
            int sum = 0;
            for (int i = 0; i < a.Length; i++)
            {
                sum = sum + a[i];
            }
            Array.Sort(a);
            max = a[4];
            min = a[0];
            avg = sum / 5;
            return sum;
        }
        public static int Lianxi07(fruit f) 
        {
            int shuiguo = (int)f;
            return shuiguo;
        }
        public static void Lianxi08(zhiye z) 
        {
            switch (z)
            {
                case zhiye.战士:
                    Console.WriteLine("战士的技能：碎石打击、烈焰锚钩、战斗咆哮");
                    break;
                case zhiye.法师:
                    Console.WriteLine("法师的技能：巨浪冲击、元素突击、复仇杀戮");
                    break;
                case zhiye.精灵:
                    Console.WriteLine("精灵的技能：减速陷阱、能量浪潮、旋风剑舞");
                    break;
            }
        }

    }
}
